package com.water.bs.service;

import com.water.bs.mapper.GoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;

    public List<Map<String,Object>> qryGoods(){return goodsMapper.qryGoods();}
    public List<Map<String,Object>> qryGoodsNeed(String orgid){return goodsMapper.qryGoodsNeed(orgid);} //查询机构需要的物品
    public int updategoodsneed(Map<String,Object>map){return goodsMapper.updategoodsneed(map);}
    public int clearneed(Map<String,Object>map){return goodsMapper.clearneed(map);}
    public int editGood(Map<String,Object>map){return goodsMapper.editGood(map);}
    public int addGood(Map<String,Object>map){return goodsMapper.addGood(map);}

    public List<Map<String,Object>>qryType(){return goodsMapper.qryType();}//查询物品分类表
    public List<Map<String,Object>>qryTypeDetail(String fatherid){return goodsMapper.qryTypeDetail(fatherid);}//查询物品分类详细表
    public int editFatherTypeName(Map<String,Object> map){return goodsMapper.editFatherTypeName(map);}//修改父类别名称
    public int  addFatherType(Map<String,Object> map){return goodsMapper.addFatherType(map);}
    public int delFatherType(String fatherid){return goodsMapper.delFatherType(fatherid);}


    public int editChildTypeName(Map<String,Object> map) {
        return goodsMapper.editChildTypeName(map);
    }

    public int addChildTypeName(Map<String,Object> map) {
        return goodsMapper.addChildTypeName(map);
    }
    public int delChildType(String childid){
        return goodsMapper.delChildType(childid);
    }
}
